#ifndef _DICTCOMP_H_
#define _DICTCOMP_H_
#include "ast/exprType.h"
#include "ast/comprehensionType.h"
#include "AstTypes.h"
class IVisitor;
class DictComp;
typedef QSharedPointer<DictComp> DictCompPtr;

class DictComp: public exprType
{
public:
    explicit DictComp(const exprTypePtr& key, const exprTypePtr& value, const ComprehensionTypeList& generators, int nodeId=-1);
    virtual ~DictComp();
    
    
    exprTypePtr key();
    void setKey(const exprTypePtr& key);
    
    exprTypePtr value();
    void setValue(const exprTypePtr& value);
    
    ComprehensionTypeList generators();
    void setGenerators(const ComprehensionTypeList& generators);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _key;
    exprTypePtr _value;
    ComprehensionTypeList _generators;
};




#endif